home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / gnuplot / term / tgif.h < prev    next >
C/C++ Source or Header  |  1993-09-15  |  4KB  |  214 lines

  1. /*
  2.  * $Id: tgif.h%v 3.50 1993/07/09 05:35:24 woo Exp $
  3.  */
  4.  
  5. /*
  6.  * Author:    William Chia-Wei Cheng (william@cs.ucla.edu)
  7.  *
  8.  * Copyright (C) 1990, 1991, William Cheng.
  9.  *
  10.  */
  11.  
  12. #define TOOL_NAME "Tgif"
  13.  
  14. #ifndef NULL
  15. #define NULL 0
  16. #endif /* ~NULL */
  17.  
  18. #ifndef TRUE
  19. #define FALSE 0
  20. #define TRUE 1
  21. #endif /* ~TRUE */
  22.  
  23. #define INVALID -1
  24. #define BAD -2
  25.  
  26. #define SINGLECOLOR (FALSE)
  27. #define MULTICOLOR (TRUE)
  28.  
  29. #define BUTTONSMASK ((Button1Mask)|(Button2Mask)|(Button3Mask))
  30.  
  31. #ifndef max
  32. #define max(A,B) ((A) > (B) ? (A) : (B))
  33. #define min(A,B) ((A) > (B) ? (B) : (A))
  34. #endif /* ~max */
  35.  
  36. #ifndef round
  37. #define round(X) (((X) >= 0) ? (int)((X)+0.5) : (int)((X)-0.5))
  38. #endif /* ~round */
  39.  
  40. #define OFFSET_X(AbsX) (((AbsX) - drawOrigX) >> zoomScale)
  41. #define OFFSET_Y(AbsY) (((AbsY) - drawOrigY) >> zoomScale)
  42.  
  43. #define ABS_X(OffsetX) (((OffsetX)<<zoomScale) + drawOrigX)
  44. #define ABS_Y(OffsetY) (((OffsetY)<<zoomScale) + drawOrigY)
  45.  
  46. #define SetRecVals(R,X,Y,W,H) ((R).x=(X),(R).y=(Y),(R).width=(W),(R).height=(H))
  47.  
  48. #define MAXSTRING 256
  49. #define MAXPATHLENGTH 256
  50.  
  51. /* object types */
  52.  
  53. #define OBJ_POLY 0
  54. #define OBJ_BOX 1
  55. #define OBJ_OVAL 2
  56. #define OBJ_TEXT 3
  57. #define OBJ_POLYGON 4
  58. #define OBJ_GROUP 5
  59. #define OBJ_SYM 6
  60. #define OBJ_ICON 7
  61. #define OBJ_ARC 8
  62. #define OBJ_RCBOX 9
  63. #define OBJ_XBM 10
  64.  
  65. /* drawing modes */
  66.  
  67. #define NOTHING 0
  68. #define DRAWTEXT 1
  69. #define DRAWBOX 2
  70. #define DRAWCIRCLE 3
  71. #define DRAWPOLY 4
  72. #define DRAWPOLYGON 5
  73. #define DRAWARC 6
  74. #define DRAWRCBOX 7
  75.  
  76. #define MAXCHOICES 8
  77.  
  78. /* stipple patterns */
  79.  
  80. #define NONEPAT 0
  81. #define SOLIDPAT 1
  82. #define BACKPAT 2
  83. #define SCROLLPAT 7
  84. #define MAXPATTERNS 20
  85.  
  86. /* line stuff */
  87.  
  88. #define LINE_THIN 0
  89. #define LINE_MEDIUM 1
  90. #define LINE_THICK 2
  91. #define LINE_CURVED 3 /* compatibility hack for fileVersion <= 3 */
  92.  
  93. #define MAXLINEWIDTHS 7
  94.  
  95. #define LT_STRAIGHT 0
  96. #define LT_SPLINE 1
  97.  
  98. #define MAXLINETYPES 2
  99.  
  100. #define LS_PLAIN 0
  101. #define LS_RIGHT 1
  102. #define LS_LEFT 2
  103. #define LS_DOUBLE 3
  104.  
  105. #define MAXLINESTYLES 4
  106.  
  107. #define MAXDASHES 5
  108.  
  109. #define NOCONT (FALSE)
  110. #define CONT (TRUE)
  111.  
  112. #define NORB (FALSE)
  113. #define RB (TRUE)
  114.  
  115. /* font stuff */
  116.  
  117. #define FONT_TIM 0
  118. #define FONT_COU 1
  119. #define FONT_HEL 2
  120. #define FONT_CEN 3
  121. #define FONT_SYM 4
  122.  
  123. #define MAXFONTS 5
  124.  
  125. #define STYLE_NR 0
  126. #define STYLE_BR 1
  127. #define STYLE_NI 2
  128. #define STYLE_BI 3
  129.  
  130. #define MAXFONTSTYLES 4
  131.  
  132. #define FONT_DPI_75 0
  133. #define FONT_DPI_100 1
  134.  
  135. #define MAXFONTDPIS 2
  136.  
  137. #define MAXFONTSIZES 6
  138.  
  139. #define JUST_L 0
  140. #define JUST_C 1
  141. #define JUST_R 2
  142.  
  143. #define MAXJUSTS 3
  144.  
  145. /* alignment */
  146.  
  147. #define ALIGN_N 0
  148.  
  149. #define ALIGN_L 1
  150. #define ALIGN_C 2
  151. #define ALIGN_R 3
  152.  
  153. #define ALIGN_T 1
  154. #define ALIGN_M 2
  155. #define ALIGN_B 3
  156.  
  157. #define MAXALIGNS 4
  158.  
  159. /* color */
  160.  
  161. #define MAXCOLORS 10
  162.  
  163. /* button stuff */
  164.  
  165. #define CONFIRM_YES 0
  166. #define CONFIRM_NO 1
  167. #define CONFIRM_CANCEL 2
  168. #define MAX_CONFIRMS 3
  169.  
  170. #define BUTTON_INVERT 0
  171. #define BUTTON_NORMAL 1
  172.  
  173. /* page layout */
  174.  
  175. #define PORTRAIT 0
  176. #define LANDSCAPE 1
  177. #define HIGHPORT 2
  178. #define HIGHLAND 3
  179. #define SLIDEPORT 4
  180. #define SLIDELAND 5
  181.  
  182. #define MAXPAGESTYLES 6
  183.  
  184. /* where to print */
  185.  
  186. #define PRINTER 0
  187. #define LATEX_FIG 1
  188. #define PS_FILE 2
  189. #define XBM_FILE 3
  190.  
  191. #define MAXWHERETOPRINT 4
  192.  
  193. /* measurement */
  194.  
  195. #define PIX_PER_INCH 128
  196. #define ONE_INCH (PIX_PER_INCH)
  197. #define HALF_INCH (PIX_PER_INCH/2)
  198. #define QUARTER_INCH (PIX_PER_INCH/4)
  199. #define EIGHTH_INCH (PIX_PER_INCH/8)
  200.  
  201. #define DEFAULT_GRID (EIGHTH_INCH)
  202.  
  203. /* text rotation */
  204.  
  205. #define ROTATE0 0
  206. #define ROTATE90 1
  207. #define ROTATE180 2
  208. #define ROTATE270 3
  209.  
  210. /* arc */
  211.  
  212. #define ARC_CCW 0 /* counter-clock-wise */
  213. #define ARC_CW 1 /* clock-wise */
  214.